{% extends 'base.html' %}

{% block content %}

<a href="{% url 'core:discipline_type_create' %}" class="btn btn-primary mb-3">新增违纪类型</a>
<table class="table table-striped">
    <thead class="table-dark">
        <tr>
            <th>名称</th>
            <th>描述</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for type in discipline_types %}
        <tr>
            <td><i class="bi bi-exclamation-triangle text-danger me-2"></i>{{ type.name }}</td>
            <td>{{ type.description }}</td>
            <td>
                <a href="{% url 'core:discipline_type_update' type.pk %}" class="btn btn-sm btn-warning">编辑</a>
                <a href="{% url 'core:discipline_type_delete' type.pk %}" class="btn btn-sm btn-danger">删除</a>
            </td>
        </tr>
        {% empty %}
        <tr><td colspan="3">暂无违纪类型记录</td></tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}